home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.applications
- Path: fnnews.fnal.gov!unixhub!news
- From: wglp09@scsa1.slac.stanford.edu (W.G.J. Langeveld)
- Subject: Re: Executive Probs with Maple
- Content-Type: text/plain; charset=iso-8859-1
- Message-ID: <DLAvwq.FuI@unixhub.SLAC.Stanford.EDU>
- Sender: news@unixhub.SLAC.Stanford.EDU
- Content-Transfer-Encoding: 8bit
- Organization: Stanford Linear Accelerator Center
- X-Newsreader: Interworks_GRn 3.0b11 September 9, 1995
- References: <4d8soj$a8i@walrus.megabaud.fi>
- Mime-Version: 1.0
- Date: Wed, 17 Jan 1996 00:55:38 GMT
-
- In article <4d8soj$a8i@walrus.megabaud.fi> petrin@walrus.megabaud.fi (Petri Nordlund) writes:
- > W.G.J. Langeveld <wglp09@scsa1.slac.stanford.edu> writes:
- > >> >Having said that, if there's a way we can make Executive happy in an upcoming
- > >> >patch of (that is, if there will be one) Maple without compromising running
- > >> >without Executive, then we will likely do so.
- > >>
- > >> Yes there is, the Maple<-->MaplePlot3D interface should be fixed so that
- > >> it would work regardless of task priorities. I wonder why the MaplePlot3D
- > >> task was given priority -24 in the first place?
- > >
- > >My guess is that Executive sets it that way. Here's why I think so.
- > >I call SystemTags() with just enough parameters to run the plotter. I do not
- > >specify a priority, because SystemTags is documented as setting the priority
- > >to the same value as the task calling it, which is precisely what I want: I
- > >want the main Maple program and the plotter to get equal CPU time. And that
- > >single call to SystemTags() is all that happens. There's no task priority
- > >setting anywhere else in Maple. If that's not "compatible with system legal
- > >software" then I don't know what is.
- >
- > I have tested Executive only with Maple 1.0, may something was
- > changed in later versions?
-
- You mean the original version of Maple for the Amiga, not Maple V release 3?
- You betcha it was changed. It was rewritten completely, not a line of code is
- the same.
-
- > >Here's my guess at what happens: Assume Maple gets started at priority 0.
- > >Now, someone wants to plot something. Maple needs to do a bunch of calculations
- > >before it is ready to spawn the plotter. By that time, perhaps, Executive has
- > >set Maple's priority down to -24, to give other tasks (if any) a chance to
- > >work. And, perhaps, Maple executes the SystemTags call for some reason not
- > >at priority 0 as it otherwise would but still at priority -24. And so, the
- > >base priority of the plotter becomes -24, and assuming that Executive will
- > >never let any task get a priority higher than its base priority, the plotter
- > >will essentially never run. If my guess is correct, then it's clearly a bug
- > >in Executive: it should start tasks spawned by other tasks at the same *base*
- > >priority as the parent task, not at the *current* priority of the parent task.
- >
- > I know this problem and in AddTask() Executive checks if the parent
- > task is scheduled, and if the new task has same priority, it will be
- > given the parent task's real priority. The scheduler will adjust the
- > priority later, but Executive remembers correct task priorities and
- > can restore them when it quits.
-
- Good, that's how it is supposed to work. So you are SetFunction()ing
- AddTask()?
-
- > If the MaplePlot3D task would get its priority (-24) from the
-
- Now, let's be clear on this, are you testing this with the old version of
- Maple? What is the name of the plotter's executable? If it is MaplePlot3D
- or MaplePlot3D881, then you're talking about the old version, and I will
- have nothing to do with it. It could well start things at -24, who knows?
- I didn't write that version. If the name of the executable is mplotamiga.881
- (or mplotamiga.ieee) then we're talking about the new version. Let's only
- discuss the new version from now on.
-
- > parent task, then the parent task should also have priority -24,
- > but it doesn't, it is 0.
- >
- > Anyway, the MaplePlot3D task gets priority -24 even without Executive.
- > I tried booting without startup-sequence and then started Maple, and
- > the priority was -24. The system was totally clean, no other programs,
- > not even SetPatch was run.
- >
- > I did some testing, and when AddTask() is called, the priority in the
- > task structure is already set to -24.
-
- I have a feeling you're testing the old version.
-
- > >By the way, if a user did not run Executive, and if the user just set the
- > >priority of Maple to something else, everything would continue to work:
- > >the plotter would still be started up at the same priority as Maple itself,
- > >if the plotter wasn't running yet. And if the plotter were already running
- > >and the user set Maple's priority higher then the plotter's, then the user
- > >would get the completely expected result that the plotter wouldn't run very
- > >well. My answer would simply be: don't do that.
- >
- > But if user lowers Maple's priority below the plotter's, the plotter
- > will not work anymore.
-
- Not true, actually. The plotter will run fine with Maple's priority set
- lower. That is, it can redraw stuff and rotate, etc. Again, I suspect
- you're looking at the old version.
-
- Willy.
-
- --
- W.G.J. Langeveld - SLAC | e-mail: wglp09@scsa1.slac.stanford.edu
- | langeveld@bix.com
-